Many Internet-capable devices are available to consumers. Specifically, the number of mobile Internet-capable devices is increasing rapidly. Some Internet-capable devices integrate several functions. For example, a personal digital assistant (PDA), or a cellular telephone may be used for Internet access in addition to other shared functions. A PDA or a cell phone usually has a very different Internet capability than a desktop computer, based upon limitations of screen size, connectivity and system resources. For example, a PDA display may not display very large fonts, pictures, movies, or tables of data or long text strings that would be viewable on a full-size display. It is desirable to accommodate as many devices as possible for Internet content to maximize the benefit of web-based services.
Accompanying the increase in mobile devices accessing the Internet is the number of services that provide active content to the user. For example, a mobile device user-interface (UI), such as an ASP.NET page, may be constructed of a hierarchy of server-side controls. When a page is executed, the objects in the page hierarchy are processed to render the content that is transmitted to the client device. During the rendering process, formatting and layout information specified for the controls is transformed into markup tags interpreted by the client device to produce the desired appearance on the display. When specifying web-application UI for mobile devices, the application author often needs to tailor elements of the UI for different devices or browsers. For example, a label identifying a mail message may be long and descriptive on a device with a larger screen, and short on a device with a smaller screen. Generally, device-specific markup requires the developer to utilize conditional constructs or to use stylesheets or includes. However, since such device customizations are relatively minor, they have high maintainability costs for tasks such as interspersing code or managing multiple files for small visual element differences.